﻿''' <summary>
''' The basic player class. It is through this class that players make their bid, and the game engine is notified that the player made a bid.
''' </summary>
''' <remarks></remarks>
Public MustInherit Class PlayerBase
    Private _bidHistory As New Stack(Of Bid)
    Private _hiddenDices As New List(Of Integer)

    Public Property Name As String

    Public Property HiddenDices As List(Of Integer)
        Get
            Return _hiddenDices
        End Get
        Set(ByVal value As List(Of Integer))
            _hiddenDices = value
        End Set
    End Property

    Public Event BidMade(ByVal player As PlayerBase, ByVal bid As Bid)
    Public Event TimeToMakeABid(ByVal player As PlayerBase, ByVal previousBid As Bid)

    Public Sub AskForBid(ByVal previousBid As Bid)
        ' Let the player or AI know that the engine wants a bid
        RaiseEvent TimeToMakeABid(Me, previousBid)
    End Sub

    Public Sub MakeBid(ByVal bid As Bid)
        _bidHistory.Push(bid)

        ' Let the engine know that a bid was made
        RaiseEvent BidMade(Me, bid)
    End Sub

    Public MustOverride ReadOnly Property IsHuman() As Boolean
End Class
